package com.zzedu.dto;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 学生信息对象 zz_student
 *
 * @author Mr.Wang
 * @date 2025-02-16
 */
public class ZzStudentDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * id
     */

    private Long id;
    /**
     * 姓名
     */
    private String stuName;
    /**
     * 头像
     */
    private Long avatar;
    /**
     * 性别
     */
    private Integer stuSex;
    /**
     * 学号
     */
    private String stuCode;
    /**
     * 联系电话
     */
    private String tel;
    /**
     * 生日
     */

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthDay;
    /**
     * 对应学校
     */
    private Long schoolId;
    /**
     * 省
     */
    private String province;
    /**
     * 市
     */
    private String city;
    /**
     * 区
     */
    private String district;
    /**
     * 详细地址
     */
    private String address;
    /**
     * 状态 0-暂停 1正常
     */
    private Integer state;

    private Map<String, Object> params;
    /**
     * 当前记录起始索引
     */
    private Long pageNum = 1l;

    /**
     * 每页显示记录数
     */
    private Long pageSize = 20l;

    /**
     * 排序列
     */
    private String orderByColumn;

    /**
     * 排序的方向desc或者asc
     */
    private String isAsc = "asc";
    /**
     * 省 市 区 集合
     */
    private String[] provinceAndCityAndDistrict;

    /**
     * 学校ID
     */
    private List<Long> schoolIdArray;
    /**
     * 查询时候  省 市 区 集合
     */
    private List<String[]> queryProvinceAndCityAndDistrict;

    /**
     * 登录密码
     */
    private String pwd;


    /**
     * 在班级x内的学生
     */
    private Long includeClassId;

    /**
     * 不在班级x内的学生
     */
    private Long excludeClassId;

    /**
     * 机构ID
     */
    private Long orgId;

    /**
     * 班级
     */
    private String classInfo;
    /**
     * 老师
     */
    private String teacherName;
    /**
     * 有效期开始
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime validFrom;
    /**
     * 有效期结束
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime validTo;
    /**
     * 年龄
     */
    private Integer age;
    /**
     * 学生会员类型
     * 1-季度。2-半年 3-全年
     */
    private Integer memberType;

    private String nickName;

    /**
     * 是否分班
     */
    private Integer clzzFlag;
    /**
     * 学员类型
     * 1-正式
     * 2-体验
     */
    private Integer stuType;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public String getStuName() {
        return stuName;
    }

    public void setAvatar(Long avatar) {
        this.avatar = avatar;
    }

    public Long getAvatar() {
        return avatar;
    }

    public void setStuSex(Integer stuSex) {
        this.stuSex = stuSex;
    }

    public Integer getStuSex() {
        return stuSex;
    }

    public void setStuCode(String stuCode) {
        this.stuCode = stuCode;
    }

    public String getStuCode() {
        return stuCode;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getTel() {
        return tel;
    }

    public LocalDate getBirthDay() {
        return birthDay;
    }

    public void setBirthDay(LocalDate birthDay) {
        this.birthDay = birthDay;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }

    public Long getSchoolId() {
        return schoolId;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getProvince() {
        return province;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCity() {
        return city;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getDistrict() {
        return district;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getState() {
        return state;
    }


    public Long getPageNum() {
        return pageNum;
    }

    public void setPageNum(Long pageNum) {
        this.pageNum = pageNum;
    }

    public Long getPageSize() {
        return pageSize;
    }

    public void setPageSize(Long pageSize) {
        this.pageSize = pageSize;
    }

    public String getOrderByColumn() {
        return orderByColumn;
    }

    public void setOrderByColumn(String orderByColumn) {
        this.orderByColumn = orderByColumn;
    }

    public String getIsAsc() {
        return isAsc;
    }

    public void setIsAsc(String isAsc) {
        this.isAsc = isAsc;
    }

    public Map<String, Object> getParams() {
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }

    public IPage getPageDTO() {
        return PageDTO.of(getPageNum(), getPageSize());
    }

    public String[] getProvinceAndCityAndDistrict() {
        return provinceAndCityAndDistrict;
    }

    public void setProvinceAndCityAndDistrict(String[] provinceAndCityAndDistrict) {
        this.provinceAndCityAndDistrict = provinceAndCityAndDistrict;
    }

    public List<Long> getSchoolIdArray() {
        return schoolIdArray;
    }

    public void setSchoolIdArray(List<Long> schoolIdArray) {
        this.schoolIdArray = schoolIdArray;
    }

    public List<String[]> getQueryProvinceAndCityAndDistrict() {
        return queryProvinceAndCityAndDistrict;
    }

    public void setQueryProvinceAndCityAndDistrict(List<String[]> queryProvinceAndCityAndDistrict) {
        this.queryProvinceAndCityAndDistrict = queryProvinceAndCityAndDistrict;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public Long getIncludeClassId() {
        return includeClassId;
    }

    public void setIncludeClassId(Long includeClassId) {
        this.includeClassId = includeClassId;
    }

    public Long getExcludeClassId() {
        return excludeClassId;
    }

    public void setExcludeClassId(Long excludeClassId) {
        this.excludeClassId = excludeClassId;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public String getClassInfo() {
        return classInfo;
    }

    public void setClassInfo(String classInfo) {
        this.classInfo = classInfo;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public LocalDateTime getValidFrom() {
        return validFrom;
    }

    public void setValidFrom(LocalDateTime validFrom) {
        this.validFrom = validFrom;
    }

    public LocalDateTime getValidTo() {
        return validTo;
    }

    public void setValidTo(LocalDateTime validTo) {
        this.validTo = validTo;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getMemberType() {
        return memberType;
    }

    public void setMemberType(Integer memberType) {
        this.memberType = memberType;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Integer getClzzFlag() {
        return clzzFlag;
    }

    public void setClzzFlag(Integer clzzFlag) {
        this.clzzFlag = clzzFlag;
    }

    public Integer getStuType() {
        return stuType;
    }

    public void setStuType(Integer stuType) {
        this.stuType = stuType;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
